package com.suray.wcs.service.wmsconnect.listener;

import com.github.rholder.retry.Attempt;
import com.github.rholder.retry.RetryListener;
import com.suray.wcs.service.config.properties.WcsProperties;
import lombok.extern.slf4j.Slf4j;

/**
 * @description:重试监听类
 * @author caox@suray.cn
 * @date 2020/7/22 14:25
 */
@Slf4j
public class RetryWarnListener implements RetryListener {
    @Override
    public void onRetry(Attempt attempt) {
        if(attempt.getAttemptNumber() == WcsProperties.ATTEMPT_NUM_WARN_3){
            //TODO 发起警告
            log.info("重试3次，还未成功");
        }
    }
}
